home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************
- * *
- * Copyright (C) 1996, Silicon Graphics, Inc. *
- * All Rights Reserved. *
- * *
- * The files in this subtree contain UNPUBLISHED PROPRIETARY SOURCE *
- * CODE of Silicon Graphics, Inc.; the contents of these files may *
- * not be disclosed to third parties, copied or duplicated in any *
- * form, in whole or in part, without the prior written permission *
- * of Silicon Graphics, Inc. *
- * *
- * RESTRICTED RIGHTS LEGEND: *
- * Use, duplication or disclosure by the Government is subject to *
- * restrictions as set forth in subdivision (c)(1)(ii) of the Rights in *
- * Technical Data and Computer Software clause at DFARS 252.227-7013, *
- * and/or in similar or successor clauses in the FAR, DOD or NASA FAR *
- * Supplement. Unpublished - rights reserved under the Copyright Laws *
- * of the United States. *
- * *
- * THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, *
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY *
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. *
- * *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, *
- * INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY *
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, *
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY *
- * THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR *
- * PERFORMANCE OF THIS SOFTWARE. *
- **************************************************************************/
-
- /*
- Author : Paul Hansen & Patrick Bouchaud
- hansen@engr.sgi.com galaad@neu.sgi.com
- */
-
- #define SUP(a,b) ( (a)<(b) ? (b) : (a) )
- #define INF(a,b) ( (a)>(b) ? (b) : (a) )
- #define DEG2RAD(D) ((3.14159265358 / 180.0) * (D))
-
- #define NUM_LATITUDE 920
- #define D_LATITUDE 66.76678 /* in meters */
- #define INV_DLAT (1/66.76678) /* in meters */
- #define LAT_STRIDE 4
-
- #define NUM_LONGITUDE 650
- #define D_LONGITUDE 92.63999 /* in meters */
- #define LON_STRIDE 4
- #define INV_DLON (1/92.63999) /* in meters */
-
- #define RADADA 50.
-
- #define IMAGE_WIDTH 6000
- #define IMAGE_HEIGHT 6000
- #define TEXTURE_WIDTH 512
- #define TEXTURE_HEIGHT 512
- #define TILE_WIDTH 256
- #define TILE_HEIGHT 256
- #define MAXLEV 9
- #define NUMQUAD 2
- #define NUMTILE_S 12
- #define NUMTILE_T 12
- #define NUMTEX (NUMTILE_S*NUMTILE_T)
- #define MAXGRID_LAT (NUM_LATITUDE/NUMTILE_S/2+1)
- #define MAXGRID_LON (NUM_LONGITUDE/NUMTILE_T/2+1)
- #define ISCALE_S 0.02550326
- #define ISCALE_T 0.03611325
-
- typedef struct {
- float matrix[4][4];
- } matrixRec;
-
- #ifdef MAIN_PROGRAM
-
- float far_cull_dist, near_cull_dist;
- float Terrain[NUM_LATITUDE][NUM_LONGITUDE];
-
- #else /* MAIN_PROGRAM */
-
- extern float far_cull_dist, near_cull_dist;
- extern float Terrain[NUM_LATITUDE][NUM_LONGITUDE];
-
- #endif /* MAIN_PROGRAM */
-